# Contributor: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
# Maintainer: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
pkgname=py3-orcid
_pkgorig=orcid
pkgver=1.0.3
pkgrel=5
pkgdesc="Python wrapper around ORCID API"
url="https://github.com/ORCID/python-orcid"
arch="noarch"
license="BSD-3-Clause"
depends="
	python3
	py3-beautifulsoup4
	py3-html5lib
	py3-lxml
	py3-requests
	py3-simplejson
	"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
checkdepends="py3-pytest py3-pytest-cov"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/o/orcid/orcid-$pkgver.tar.gz"
builddir="$srcdir/$_pkgorig-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

# tests disabled due to the network tests (API); use smoke tests instead
check() {
	PYTHONPATH=build/lib python3 -c "from orcid import *"
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
d50f744cf3c02355d5f5429213a264b062b6a9592030880ec2d62e9039c4527afac2ced502074d1e8ae4f1071136dc136525e1cb8326bc666bee0d9c156e1570  py3-orcid-1.0.3.tar.gz
"
